import socket as sk


def main():
    tcp_server_socket = sk.socket(sk.AF_INET, sk.SOCK_STREAM)
    address = ('', 7788)
    tcp_server_socket.bind(address)
    tcp_server_socket.listen(128)
    client_socket, client_addr = tcp_server_socket.accept()
    print("client_addr:", client_addr)
    recv_data = client_socket.recv(1024)
    print("Received data:", recv_data.decode("utf-8"))
    client_socket.send("thank you!".encode("utf-8"))
    client_socket.close()
    pass


if __name__ == '__main__':
    main()
